package binaryTree;


/** 
 * 节点结构
 */
class BTNode<AnyType>{
	/**节点数据域*/
	private AnyType data;
	/**左孩子节点*/
	private BTNode<AnyType> leftChildNode;
	/**右孩子节点*/
	private BTNode<AnyType> rightChildNode;
	
	BTNode(){
		data=null;
		leftChildNode=rightChildNode=null;
	}
	BTNode(AnyType data){
		this.data=data;
		leftChildNode=rightChildNode=null;
	}
	BTNode(AnyType data,BTNode<AnyType> lc,BTNode<AnyType> rc){
		this.data=data;
		this.leftChildNode=lc;
		this.rightChildNode=rc;
	}
	public  BTNode<AnyType> getLeftChild(){
		return leftChildNode;
	}
	public void setLeftChild(BTNode<AnyType> lc){
		this.leftChildNode=lc;
	}
	public BTNode<AnyType> getRightChild(){
		return rightChildNode;
	}
	public void setRightChild(BTNode<AnyType> rc){
		this.rightChildNode=rc;
	}
	public Object getData(){
		return data;
	}
	public void setData(AnyType d){
		this.data=d;
	}
	
}